<template>
  <view class="list">
    <view class="list-item" v-for="(item, index) in list" :key="index" @click="onClickItem(item)">
      <rich-text :nodes="item.content"></rich-text>
    </view>
  </view>
</template>
<script>
  export default {
    props: {
      list: {
        type: Array,
        default: []
      }
    },
    methods: {
      onClickItem(item) {
        this.$emit('clickItem', item)
      }
    }
  }
</script>
<style lang="scss" scoped>
  .list {
    .list-item {
      padding: 12rpx 20rpx;
      font-size: 24rpx;
      border-bottom: 1rpx solid #ccc;
    }
  }
</style>
